home *** CD-ROM | disk | FTP | other *** search
/ Graphics Plus / Graphics Plus.iso / general / visulztn / sphinx / sphinx.lha / examples / dupli.f next >
Text File  |  1993-03-27  |  1KB  |  58 lines

  1. c****HP    first line
  2. c     program mire(para)
  3. c****SG    first line
  4.       program mire
  5.       character *140 para
  6.       character *140  mess
  7.       character imar(2048*2048)
  8.       character imag(2048*2048)
  9.       character imab(2048*2048)
  10.       integer sizex,sizey
  11.       logical redr,greenr,bluer
  12.       common/images/imar,imag,imab
  13. C
  14.       print*,"external program example: duplication"
  15. c**** SG external parameter
  16.       call getarg(1,para)
  17. c
  18.       call sphinx_get_para
  19.      *(sizex,sizey,redr,greenr,bluer,para,mess)
  20.       print*,"image size:",sizex,sizey
  21.       print*,"input banks:",redr,greenr,bluer
  22.       print*,"message zone:",mess(1:30)
  23.       call sphinx_read(para,imar,imag,imab)
  24.       is=sizex*sizey
  25.       if(bluer.and..not.greenr)then
  26.       do i =1,is
  27.       imag(i)=imab(i)
  28.       enddo
  29.       endif
  30.       if(bluer.and..not.redr)then
  31.       do i =1,is
  32.       imar(i)=imab(i)
  33.       enddo
  34.       endif
  35.       if(greenr.and..not.bluer)then
  36.       do i =1,is
  37.       imab(i)=imag(i)
  38.       enddo
  39.       endif
  40.       if(greenr.and..not.redr)then
  41.       do i =1,is
  42.       imar(i)=imag(i)
  43.       enddo
  44.       endif
  45.       if(redr.and..not.greenr)then
  46.       do i =1,is
  47.       imag(i)=imar(i)
  48.       enddo
  49.       endif
  50.       if(redr.and..not.bluer)then
  51.       do i =1,is
  52.       imab(i)=imar(i)
  53.       enddo
  54.       endif
  55.       call sphinx_write(para,imar,imag,imab)
  56.       stop
  57.       end
  58.